Page({
  data: {
    needs:'',
    phone:''
  },
  inputNeeds(e){
    this.setData({ needs : e.detail.value})
  },
  inputPhone(e){
    this.setData({ phone : e.detail.value})
  },
  submitFn(){
      if(this.data.needs == ''){
        wx.showToast({
          title: '请输入需求',
          icon:"none"
        })
      }else if(this.data.phone == ''){
        wx.showToast({
          title: '请输入手机号',
          icon:"none"
        })
      }else{
        wx.showToast({
          title: '提交成功'
        })
        setTimeout(()=>{
          wx.navigateBack({
            delta: 1,
          })
        },2000)
        
      }
  }
  
})
